<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<title th:text="${session.title}">123</title>
	<link th:replace="common/header"/>
	<link rel="stylesheet" th:href="@{/css/ace-skins.min.css}" />
		<script language="javascript" type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
	</head>
	<body class="navbar-fixed">
  	<div th:replace="common/top"></div>
		<div class="container-fluid main_bg" id="main-container">
			<a id="menu-toggler" href="#"><span></span></a>
			<div th:replace="common/menu"></div>
			<div id="main-content" class="clearfix">
				<div id="page-content" class="clearfix">
					<div th:replace="common/title"></div>
					<h3 class="header smaller lighter blue"><em class="icon-plus"></em>我要挂牌球员</h3>
					<div th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
					    <div th:if="${null == qyList}" th:text="'玩家' + ${session.footUser.nike} + '还没有分配队伍或无球员'">123</div>
                        <form class="form-horizontal" th:object="${footGp}" method="post" th:action="@{/hy/footGp/add}" name="form" th:if="${null != qyList}">
                        <input type="hidden" name="id" th:field="*{id}"/>
                        <input type="hidden" name="qyId" th:field="*{qyId}"/>
                        <input type="hidden" name="sellUserId" th:field="*{sellUserId}"/>
                            <div class="row-fluid">
                            <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                <div class="control-group">
                                    <label class="control-label" for="fupId">挂牌球员:<span style="color:red">*</span></label>
                                    <div class="controls">
                                        <select th:field="*{fupId}" name="fupId" id="fupId" class="input_fix" onchange="processYkj();">
                                            <option th:each="t:${qyList}" th:value="${t.fupId}" th:title="${t.qysj}" th:text="${t.yw + '(' + t.name + ')可用' + t.xycs + '场'}">123</option>
                                        </select>
                                    </div>
                                </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('fupId')}" th:errors="*{fupId}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="gpsj">挂牌时间:</label>
                                        <div class="controls">
                                            <input th:field="*{gpsj}" type="text" name="gpsj" id="gpsj" class="input_fix2" placeholder="挂牌时间"/>
                                            <img onclick="WdatePicker({el:'gpsj',dateFmt:'yyyy-MM-dd'})"
                                                style="width:16px;height:22px"  src="" alt=""
                                                th:src="@{/js/My97DatePicker/skin/datePicker.gif}">
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('gpsj')}" th:errors="*{gpsj}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                <div class="control-group">
                                    <label class="control-label">卖家:</label>
                                    <div class="controls" th:text="${session.footUser.nike}">123</div>
                                </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('sellUserId')}" th:errors="*{sellUserId}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                <div class="control-group">
                                    <label class="control-label" for="ykj">一口价:</label>
                                    <div class="controls"><input th:field="*{ykj}" type="text" name="ykj" id="ykj" class="input_fix" placeholder="一口价"/>
                                    </div>
                                </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('ykj')}" th:errors="*{ykj}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button type="submit" class="btn btn-primary"><em class="icon-save"></em>提交</button>
                                    <button type="reset" class="btn btn-danger"><em class="icon-remove"></em>取消</button>
                                    <a type="button" class="btn" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
                                </div>
                            </div>
                        </form>
					</div>
              		<!--/#page-content-->
				</div>
				<div th:replace="common/skin :: skin"></div>
		</div><!--/#main-content-->
	</div><!--/.fluid-container#main-container-->
	<div th:replace="common/js"></div>
    <script>
        $(function(){
            processYkj();
        });
        function processYkj() {
            $("#ykj").val($("#fupId").find("option:selected")[0].title);
        }
    </script>
	</body>
</html>
